from torch.utils.data import DataLoader

from recog.inference_crnn import get_crnn_model
from recog.train_raw_crnn import eval_model_crnn, lp_plate_recog_set

if __name__ == '__main__':
    eval_set = lp_plate_recog_set(root_path="/home/leo/Downloads/data_set/lp_reg/val")
    eval_loader = DataLoader(eval_set, batch_size=8, shuffle=True)
    model = get_crnn_model()
    eval_acc, eval_acc_color = eval_model_crnn(model, eval_loader, -1)
    print(eval_acc)
    print(eval_acc_color)
